﻿#region
/*******************************************************************************
** File Name:		    FoodInfoRepository.cs
** Creator:		        chao.jiang 
** EMail:               chao.jiang 
** Create date:	        
** Latest Modifier:
** Latest Modify date:
** Description:		    
** Modify History:
**
** Code Review:
**
** Version number:       1.0.0
*********************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using EWineShop.Entity;
using EWineShop.Respository;
using IBatisNet.DataMapper;
using EWineShop.Data.IBatis;

namespace EWineShop.IBatisRepository
{
    public class FoodInfoRepository : BaseIBatisDao,IFoodInfo
    {
    
		#region  Auto Generation

        public FoodInfoRepository()
            : base("/Config/IBatis/EWineShopMap.Config")
        {

        }
        		
        public void AddFoodInfo(EFoodInfo entity)
        {
			string stmtId = "FoodInfoMap.InsertFoodInfo";
			base.SqlMapper.Insert(stmtId, entity);
        }
        
		public  EFoodInfo GetByFoodInfoID (System.Int64 foodInfoID)
        {
			string stmtId = "FoodInfoMap.SelectByFoodInfoID";
			return base.SqlMapper.QueryForObject<EFoodInfo>(stmtId, foodInfoID);
        }
        
        public  void DeleteByFoodInfoID (System.Int64 foodInfoID)
        {
			string stmtId = "FoodInfoMap.DeleteByFoodInfoID";
			base.SqlMapper.Update(stmtId, foodInfoID);
        }
        
        public  void UpdateByFoodInfoID (EFoodInfo entity)
        {
			string stmtId = "FoodInfoMap.UpdateByFoodInfoID";
			base.SqlMapper.Update(stmtId, entity);
        }


		#endregion
    }
}

